import axios from '../utils/axios';
import {api} from '@/config/api'


//获取菜单树
export const menuTreeApi = (data?:any)=>{
  return axios.get(api.getMenuTree,data)
}

//根据id查找菜单
export const findMenuApi = (data?:any)=>{
  return axios.post(api.findMenu,data)
}

// 创建菜单
export const createMenuApi = (data?:any)=>{
  return axios.post(api.createMenu,data)
}

// 更新菜单
export const updateMenuApi = (data?:any)=>{
  return axios.post(api.updateMenu,data)
}

// 删除菜单
export const deleteMenuApi = (data?:any)=>{
  return axios.post(api.deleteMenu,data)
}


// 启用禁用菜单
export const changeStatusApi = (data?:any)=>{
  return axios.post(api.changeStatusMenu,data)
}

// 获取权限列表
export const menuListApi = (data?:any)=>{
  return axios.post(api.menuList,data)
}




